package com.fangfang.user;

import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.common.bean.UserInfo;
import com.fangfang.R;
import com.fangfang.home.HomeActivity;
import com.fangfang.user.views.particleview.ParticleView;

public class WelComeActivity extends AppCompatActivity {

    private ParticleView particleView;
    private UserInfo mUserInfo;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_welcome);
        particleView = (ParticleView) findViewById(R.id.pv_welcome);
        particleView.startAnim();
        particleView.setOnParticleAnimListener(new ParticleView.ParticleAnimListener() {
            @Override
            public void onAnimationEnd() {
                Intent intent = new Intent(WelComeActivity.this, HomeActivity.class);
                startActivity(intent);
                finish();
            }
        });
    }
}
